package com.catering.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 *
 * @TableName d_inventory
 */
@TableName(value ="d_inventory")
@Data
public class DInventory implements Serializable {
    /**
     * 库存ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 菜品名称
     */
    private String name;

    /**
     * 库存数量
     */
    private Integer num;

    /**
     * 当前时间
     */
    private Date date;

    /**
     * 库存过低线
     */
    private Integer dInventory;

    /**
     * 库存超出线
     */
    private Integer gInventory;

    /**
     * 菜的类别
     */
    private Integer cateId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DInventory other = (DInventory) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum()))
            && (this.getDate() == null ? other.getDate() == null : this.getDate().equals(other.getDate()))
            && (this.getdInventory() == null ? other.getdInventory() == null : this.getdInventory().equals(other.getdInventory()))
            && (this.getgInventory() == null ? other.getgInventory() == null : this.getgInventory().equals(other.getgInventory()))
            && (this.getCateId() == null ? other.getCateId() == null : this.getCateId().equals(other.getCateId()));
    }

    private Object getgInventory() {
        return null;
    }

    private Object getdInventory() {
        return null;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode());
        result = prime * result + ((getDate() == null) ? 0 : getDate().hashCode());
        result = prime * result + ((getdInventory() == null) ? 0 : getdInventory().hashCode());
        result = prime * result + ((getgInventory() == null) ? 0 : getgInventory().hashCode());
        result = prime * result + ((getCateId() == null) ? 0 : getCateId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", num=").append(num);
        sb.append(", date=").append(date);
        sb.append(", dInventory=").append(dInventory);
        sb.append(", gInventory=").append(gInventory);
        sb.append(", cateId=").append(cateId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
